package axio.sdf.run;

import java.util.Scanner;
import axio.sdf.combined.Combine;
import axio.sdf.read.Reader;

public class sdfmgt {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		Reader reader = new Reader();
		Combine combine = new Combine();
		String Dividepath=null;
		int division;
		int input = 0;
		
		while (!(input == 1 && input == 2)) {
			System.out.println("\t1) Division \n\t2)Combination\n");	
			System.out.print("Enter Correct number: ");
			input = scanner.nextInt();
			scanner.nextLine();
			
			switch (input) {
			case 1:
				System.out.print("Please Enter your *.sdf file path: ");
				Dividepath = scanner.nextLine();
				System.out.print("How many parts do you want: ");
				division = scanner.nextInt();
				reader.CountDivideFile(Dividepath, division);
				
				break;
				
			case 2:
				System.out.print("Please Enter your first file path: ");
				String Combinedpath = scanner.nextLine();
				System.out.print("How many parts do you want to combined: ");
				int combinednumber = scanner.nextInt();
				combine.CombinedFile(Combinedpath, combinednumber);
				
				break;

			default:
				System.out.println("Invalid Input... Try again\n\n\n");
				break;
			}
		}
	}

}
